﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using SES.CMS.BL;
using SES.CMS.DO;

namespace SES.CMS
{
    public partial class Information : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = new sysConfigBL().SelectByPK(1).Rows[0]["ConfigValue"].ToString();
            if (!string.IsNullOrEmpty(Request.QueryString["ID"]))
            {
                int ArticleID = int.Parse(Request.QueryString["ID"].ToString());
                rptInfo.DataSource = new cmsArticleBL().SelectByCategoryID(14);
                rptInfo.DataBind();
                DataTable dtArticle = new cmsArticleBL().SelectByID(ArticleID);
                if (Session["lang"].ToString() == "VN")
                {
                    lblTitle.Text = dtArticle.Rows[0]["Title"].ToString();
                    lblText.Text = dtArticle.Rows[0]["ArticleDetail"].ToString();
                }
                else if (Session["lang"].ToString() == "EN")
                {
                    lblTitle.Text = dtArticle.Rows[0]["TitleEng"].ToString();
                    lblText.Text = dtArticle.Rows[0]["ArticleDetailEng"].ToString();
                }
            }
            else
            {
                rptInfo.DataSource = new cmsArticleBL().SelectByCategoryID(14);
                rptInfo.DataBind();
            }
        }
        protected string FriendlyUrl(string s)
        {
            return Ultility.Change_AV(s);
        }
    }
}
